/*
slide img
function tinhot(json) {
img  = new Array();
for (var i = 0; i < 10; i++) { var entry = json.feed.entry[i]; var tieude = entry.title.$t; var linkurl; if (i == json.feed.entry.length) break; 
for (var k = 0; k < entry.link.length; k++) { if (entry.link[k].rel == 'alternate') { linkurl = entry.link[k].href; break } } 	
if ("content" in entry) { var noidung = entry.content.$t } else if ("summary" in entry) { var noidung = entry.summary.$t } 
else var noidung=""; s = noidung;  a = s.indexOf("<img"); b = s.indexOf("src=\"", a); c = s.indexOf("\"",b+5); d = s.substr(b+5,c-b-5); 
if((a!=-1)&&(b!=-1)&&(c!=-1)&&(d!=""))  {img[i] = d;} 
else {img[i]="https://lh5.googleusercontent.com/-bSxDSvIDcyw/UFP5RXHYsXI/AAAAAAAABBI/fsJmSX0D72Y/s66/no-img3.png";} 
B = img[i].split("/");
var l = '<table border="0" cellpadding="0" cellspacing="0" style="padding:3px 0 8px 0;border-bottom:double #ddd"><tr><td><img width="120" height="100" src="'+img[i].replace(B[7],"s200-p")+'" align="left" border="0" title="'+tieude+'" alt="'+tieude+'" class="thumt"><a href="'+linkurl+'" style="color:red;font:bold 15px Tahoma" title="'+tieude+'">'+tieude+'</a><p style="margin:0;padding:5px 0 5px;line-height:1.5em;">'+rutgon(noidung,40)+' ...</p><a class="right" href="'+linkurl+'">Xem »</a></td></tr></table>'; 
var m = '<li><div class="bload"><a href="'+linkurl+'" title="'+tieude+'"><img class="lsider" src="'+img[i].replace(B[7],"s164-p")+'" /></a><div class="clear"></div><h2><a href="'+linkurl+'" title="'+tieude+'">'+tieude+'</a></h2></div></li>'; 
if (i == 0) { var n = l + '<div id="sliderb"><div id="gallerycover"><div class="mygallery"><ul>' } 
if ((i >= 1) && (i < 10 - 1)) { var n = m } 
if (i == 10 - 1) { var n = m + '</ul><div class="clear"></div></div></div><a class="prevb" href="#"></a><a class="nextb" href="#"></a></div>' } 
document.write(n) }}
slide title
function tinhotl(json) {
for (var i = 0; i < 10; i++) { var entry = json.feed.entry[i]; var tieude = entry.title.$t; var linkurl; if (i == json.feed.entry.length) break; 
for (var k = 0; k < entry.link.length; k++) { if (entry.link[k].rel == 'alternate') { linkurl = entry.link[k].href; break } } 	
if(i >= 0 && i <= 10 ){var li = '<li><a href="'+linkurl+'" title="'+tieude+'">'+tieude+'</a></li>';} 
document.write(li); }}
*/
function newhome(json) {
img  = new Array();
for (var i = 0; i < 10; i++) { var entry = json.feed.entry[i]; var tieude = entry.title.$t; var linkurl; if (i == json.feed.entry.length) break; 
for (var k = 0; k < entry.link.length; k++) { if (entry.link[k].rel == 'alternate') { linkurl = entry.link[k].href; break } } 	
if ("content" in entry) { var noidung = entry.content.$t } else if ("summary" in entry) { var noidung = entry.summary.$t } 
else var noidung=""; s = noidung;  a = s.indexOf("<img"); b = s.indexOf("src=\"", a); c = s.indexOf("\"",b+5); d = s.substr(b+5,c-b-5); 
if((a!=-1)&&(b!=-1)&&(c!=-1)&&(d!=""))  {img[i] = d;} 
else {img[i]="https://lh5.googleusercontent.com/-bSxDSvIDcyw/UFP5RXHYsXI/AAAAAAAABBI/fsJmSX0D72Y/s66/no-img3.png";} 
B = img[i].split("/");

var l = '<table border="0" cellpadding="0" cellspacing="0" style="padding:8px 0;border-bottom:double #ddd"><tr><td><img width="110" height="65" src="'+img[i].replace(B[7],"s164-p")+'" align="left" border="0" title="'+tieude+'" alt="'+tieude+'" style="margin:0 10px 0 0"><a href="'+linkurl+'" style="color:#3D589D" title="'+tieude+'"><b>'+rutgon(tieude,6)+'...</b></a><p style="margin:0;padding:5px 0 5px;text-align:justify;">'+rutgon(noidung,18)+' ...</p></td></tr></table>';
var m = '<li><a href="'+linkurl+'" style="color:#000" title="'+tieude+'">'+rutgon(tieude,10)+'...</a></li>';
if ((i >= 0) && (i < 3)) { var n = l }
if (i == 3) { var n = '<div class="listh"><ul>' + m }
if ((i > 3) && (i < 5 - 1)) { var n = m }
if (i == 5 - 1) { var n = m + '</ul></div>' }
document.write(n) }}